include $(TOPDIR)/core/config/env.mk

USE_LIBC = yes
USE_NANO = yes

#	#if defined(__LOG_UART__)
#		LOG_PRINTF output to debug uart
#	#elif defined(__LOG_ACAT__)
#		LOG_PRINTF output to catstudio
CFLAGS += -D__LOG_UART__
EXTRA_INC +=
EXTRA_LIBS +=


SDK_INC += LinkSDK\core
SDK_INC += LinkSDK\core\utils
SDK_INC += LinkSDK\core\sysdep
SDK_INC += LinkSDK\components\dynreg
SDK_INC += LinkSDK\components\dynreg-mqtt
SDK_INC += LinkSDK\external\mbedtls\include
SDK_INC += LinkSDK\external\mbedtls\include\mbedtls

SRCS = \
	main.c
				
SRCS += LinkSDK/demos/mqtt_basic_demo.c
SRCS += LinkSDK/demos/dynreg_basic_demo.c
SRCS += LinkSDK/demos/dynregmq_basic_demo.c \
				LinkSDK/components/dynreg-mqtt/aiot_dynregmq_api.c

SRCS += LinkSDK/core/aiot_mqtt_api.c \
				LinkSDK/core/aiot_state_api.c \
				LinkSDK/core/sysdep/core_sysdep.c \
				LinkSDK/core/sysdep/core_adapter.c \
				LinkSDK/core/utils/core_auth.c \
				LinkSDK/core/utils/core_diag.c \
				LinkSDK/core/utils/core_global.c \
				LinkSDK/core/utils/core_http.c \
				LinkSDK/core/utils/core_log.c \
				LinkSDK/core/utils/core_sha256.c \
				LinkSDK/core/utils/core_string.c \
				LinkSDK/portfiles/aiot_port/freertos_port.c

SRCS += LinkSDK/components/dynreg/aiot_dynreg_api.c
				
SRCS += LinkSDK/external/ali_ca_cert.c \
				LinkSDK/external/mbedtls/library/aes.c \
				LinkSDK/external/mbedtls/library/asn1parse.c \
				LinkSDK/external/mbedtls/library/base64.c \
				LinkSDK/external/mbedtls/library/bignum.c \
				LinkSDK/external/mbedtls/library/cipher.c \
				LinkSDK/external/mbedtls/library/cipher_wrap.c \
				LinkSDK/external/mbedtls/library/ctr_drbg.c \
				LinkSDK/external/mbedtls/library/debug.c \
				LinkSDK/external/mbedtls/library/entropy.c \
				LinkSDK/external/mbedtls/library/error.c \
				LinkSDK/external/mbedtls/library/md.c \
				LinkSDK/external/mbedtls/library/md_wrap.c \
				LinkSDK/external/mbedtls/library/oid.c \
				LinkSDK/external/mbedtls/library/pem.c \
				LinkSDK/external/mbedtls/library/pk.c \
				LinkSDK/external/mbedtls/library/pk_wrap.c \
				LinkSDK/external/mbedtls/library/pkparse.c \
				LinkSDK/external/mbedtls/library/platform.c \
				LinkSDK/external/mbedtls/library/platform_util.c \
				LinkSDK/external/mbedtls/library/rsa.c \
				LinkSDK/external/mbedtls/library/rsa_internal.c \
				LinkSDK/external/mbedtls/library/sha1.c \
				LinkSDK/external/mbedtls/library/sha256.c \
				LinkSDK/external/mbedtls/library/ssl_ciphersuites.c \
				LinkSDK/external/mbedtls/library/ssl_cli.c \
				LinkSDK/external/mbedtls/library/ssl_cookie.c \
				LinkSDK/external/mbedtls/library/ssl_tls.c \
				LinkSDK/external/mbedtls/library/x509.c \
				LinkSDK/external/mbedtls/library/x509_crt.c
			
include $(TOPDIR)/core/config/rules.mk